<?php
add_action( 'init', 'movie' );
function movie() {
	register_taxonomy(
		'movie',
		'movie_code',
		array(
			'label' => __( 'movie' ),
			'rewrite' => array( 'slug' => 'course-movie'),
			'hierarchical' => true
		)
	);
	
	register_post_type( 'movie',
		array(
			'labels' => array(
				'name' => __( 'movie' ),
				'singular_name' => __( 'movie' ),
				'add_new' => _x('Add New', 'movie'),
				'add_new_item' => __('Add New movie'),
				'edit_item' => __('Edit movie'),
				'new_item' => __('New movie'),
				'view_item' => __('View movie'),
				'search_items' => __('Search movie')
			),
		'public' => true,
		'publicly_queryable' => true,
		'has_archive' => true,
		'hierarchical' => false,
		'taxonomies' => array('coursecategory'),
		'supports' => array( 'title', 'editor', 'author',  'comments', 'custom-fields', 'cats')
		)
	);
    
    //Tags
 	register_taxonomy(
		'coursetags',
		'course',
		array(
			'label' => __( 'Tags' ),
			'rewrite' => array( 'slug' => 'course-tags'),
			'hierarchical' => true
		)
	);
    
    register_post_type( 'movie',
		array(
			'labels' => array(
			'name' => __( 'movie' ),
            
			),
		'public' => true,
		'publicly_queryable' => true,
		'has_archive' => true,
		'hierarchical' => false,
		'taxonomies' => array('coursetags'),
		'supports' => array( 'title', 'editor', 'author',  'comments', 'custom-fields', 'cats')
		)
	);
}